<?php
//图片
defined('IN_YuLin') || exit('NO PERMIT!');
$table = Table('admin_banner');
//编辑
if(IS_POST){
    $_POST['pc_logo'] and $db->exec("UPDATE ".$table." SET bn_pic='".NoBadStr( $_POST['pc_logo'])."' WHERE bn_code = 'pc_logo' ");
    $_POST['mobile_logo'] and $db->exec("UPDATE ".$table." SET bn_pic='".NoBadStr( $_POST['mobile_logo'])."' WHERE bn_code = 'mobile_logo' ");
    $_POST['admin_login_logo'] and $db->exec("UPDATE ".$table." SET bn_pic='".NoBadStr( $_POST['admin_login_logo'])."' WHERE bn_code = 'admin_login_logo' ");
    AjaxReturn(['status'=>'1','msg'=>'操作成功']);
}
//列表
$listArr = $db->getall('select * from '.$table.' where bn_code in ("pc_logo","mobile_logo","admin_login_logo")  ');
foreach ($listArr as $k=>$v) $list[$v[bn_code]] = $v;


$tpl->display($m.'/'.$c);
